# @author:Wei Junjie
# @time:2024/6/11 11:19
# @file temp.py
# --*--coding: utf-8 --*--
"""
模块说明
"""
import configparser

import yaml


def create_ini():
    config = configparser.ConfigParser()

    config.add_section('pytest')

    config.set('pytest', 'disable_test_id_escaping_and_forfeit_all_rights_to_community_support',"True")

    config.set('pytest','addopts','-vs --alluredir=report/temps --clean-alluredir')

    config.set('pytest','testpaths','testcase/test_api03')

    config.set('pytest','python_files','test_*.py')

    config.set('pytest','python_classes','Test*')

    config.set('pytest','python_functions','test_*')

    # config.set('pytest','markers','smoke: mark test as smoke test\nlogin: mark test as login test')

    with open('pytest.ini', 'w') as configfile:
        config.write(configfile)

if __name__ == '__main__':
    create_ini()
    # a=float(input('请输入一个小数'))
    # temp_number=a*1000
    # if (10-temp_number%10)>5:
    #     temp_number=(temp_number-(temp_number%10))/1000
    #     print('四舍五入后的值为',temp_number)
    # else:
    #     temp_number=(temp_number+(10-temp_number%10))/1000
    #     print('四舍五入后的值为',temp_number)

